package com.google.guava.eventbus;

import com.google.common.eventbus.EventBus;
import com.google.guava.eventbus.events.Apple;
import com.google.guava.eventbus.events.Fruit;
import com.google.guava.eventbus.listeners.FruitEaterListener;

/**
 * @author fuc
 * @create 2020-10-06
 */
public class InheritEventsEventBusExample {

  public static void main(String[] args) {
    final EventBus eventBus = new EventBus();
    eventBus.register(new FruitEaterListener());
    eventBus.post(new Apple("apple"));
    System.out.println("===================");
    eventBus.post(new Fruit("apple"));
  }
}
